import request from "../utils/request";
// 根据id轮播图
export function getById(id) {
  return request.get(`/inTurns/${id}`);
}
// 获取轮播图
export function getList(params) {
  return request.get("/inTurns", { params: params });
}

// 添加轮播图
export function addInturn(data) {
  return request.post("/inTurns", data, {
    "Content-Type": " multipart/form-data",
  });
}

// 修改轮播图
export function modInturn(id, data) {
  return request.put(`/inTurns/${id}`, data, {
    "Content-Type": " multipart/form-data",
  });
}
//删除轮播图
export function deleteInturn(id, data) {
  return request.delete(`/inTurns/${id}`, data);
}
// 修改状态
export function vimState(id, delivery) {
  return request.post(`/inTurns/IsActived/${id}`, delivery);
}
